{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "num = [0,0,0,0]\n",
    "dna = list(\"AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC\")\n",
    "data = (\"A\",\"G\",\"C\",\"T\")\n",
    "for i in dna:\n",
    "    if i==\"A\":\n",
    "        num[0]+=1\n",
    "    elif i==\"G\":\n",
    "        num[1]+=1\n",
    "    elif i==\"C\":\n",
    "        num[2]+=1\n",
    "    else:\n",
    "        num[3]+=1\n",
    "for i in range(4):\n",
    "    print(data[i]+\"有\"+str(num[i])+\"个\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "num=[None]*40\n",
    "for i in range(40):\n",
    "    num[i]=0.25+0.25*i\n",
    "num=tuple(num)\n",
    "for i in num:\n",
    "    print(\"一个运动员可能得\"+str(i)+\"分\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "dict1={'城市':'广州','原料':'米'}\n",
    "dict2={'城市':'潮汕','原料':'牛肉'}\n",
    "dict3={'肠粉':dict1,\"牛肉丸\":dict2}\n",
    "for i,j in dict3.items():\n",
    "    print(\"%s\"%i+\"是\"+j[\"城市\"]+\"的一种美食，它的主要原料是\"+j[\"原料\"])"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
